ga.view.examples.simple
Class SimpleObjectMutationOp

java.lang.Object
  extended by ga.core.goperators.ProbabilityOp
      extended by ga.view.examples.simple.SimpleObjectMutationOp
All Implemented Interfaces:
IGeneticOp, IMutationOp<SimpleObjectIndividual>

public class SimpleObjectMutationOp
extends ProbabilityOp
implements IMutationOp<SimpleObjectIndividual>

Mutation operator for the simple object example.

Since:
12.08.2012
Author:
Stephan Dreyer

Constructor Summary
SimpleObjectMutationOp(int pMutate)
          Instantiates a new simple object mutation op.
 
Method Summary
 SimpleObjectIndividual mutate(SimpleObjectIndividual individual, GAContext context)
          Performs a mutation (if probability met) of the given individual and returns the new individual.
 
Methods inherited from class ga.core.goperators.ProbabilityOp
doOperate, doOperate, getRandom
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleObjectMutationOp

public SimpleObjectMutationOp(int pMutate)
Instantiates a new simple object mutation op.

Parameters:
pMutate - the mutate
Since:
12.08.2012
Method Detail

mutate

public SimpleObjectIndividual mutate(SimpleObjectIndividual individual,
                                     GAContext context)
Description copied from interface: IMutationOp
Performs a mutation (if probability met) of the given individual and returns the new individual.

Specified by:
mutate in interface IMutationOp<SimpleObjectIndividual>
Parameters:
individual - Individual to mutate.
context - The GA context.
Returns:
Mutated individual.